package cn.gdcp.lkqapp18;

import android.animation.TypeEvaluator;

public class PointEvaluator implements TypeEvaluator {

    @Override
    public Object evaluate(float fraction, Object starValue, Object endValue) {
        Point pStar = (Point) starValue;
        Point pEnd = (Point) endValue;

        int currentX = (int) (pStar.getX() + fraction * (pEnd.getX() - pStar.getX()));
        int currentY = (int) (pStar.getY() + fraction * (pEnd.getY() - pStar.getY()));
        return new Point(currentX,currentY);
    }
}
